using FireStarterModeller.BO;
using Habanero.Testability;

namespace FireStarterModeller.Test
{
    public class TestUtilsDMSortOrder
    {
        public static BOTestFactory<DMSortOrder> GetBuilder()
        {
            return BOTestFactoryRegistry.Instance.Resolve<DMSortOrder>();
        }

        /// <summary>
        /// Creates a new saved DMLookupList with a random value assigned to every property
        /// </summary>
        public static DMSortOrder CreateSavedDMSortOrder()
        {
            DMSortOrder dMLookupList = CreateUnsavedValidDMSortOrder();
            dMLookupList.Save();
            return dMLookupList;
        }

        /// <summary>
        /// Creates a new unsaved DMLookupList with a random value assigned to every property
        /// </summary>
        public static DMSortOrder CreateUnsavedValidDMSortOrder()
        {
            return GetBuilder()
                .CreateValidBusinessObject();
        }
        /// <summary>
        /// Creates a new unsaved DMLookupList with a random value assigned to every property
        /// </summary>
        public static DMSortOrder CreateStandardDMSortOrder()
        {
            return GetBuilder()
                .CreateValidBusinessObject();
        }

        /// <summary>
        /// Creates a new unsaved DMLookupList where all properties are null, except ID properties
        /// and those with default values.  If there are compulsory properties without
        /// defaults, saving the object will throw an exception.
        /// </summary>
        public static DMSortOrder CreateUnsavedDefaultDMSortOrder()
        {
            DMSortOrder dMLookupList = new DMSortOrder();
            return dMLookupList;
        }

        //---------------------------------------------------------------------
        // Use this place to add custom test packs for DMSortOrder
        // and to replace existing test packs in the "Def" part of this
        // partial class (cut the existing method and paste it here - you will
        // need to do this each time you regenerate).
        //---------------------------------------------------------------------
        public static DMSortOrder CreateUnsavedValidDMSortOrderWith3Props()
        {
            DMSortOrder dmSortOrder = CreateUnsavedValidDMSortOrder();
            TestUtilsDMSortProperty.CreateUnsavedValidDMSortProperty(dmSortOrder);
            TestUtilsDMSortProperty.CreateUnsavedValidDMSortProperty(dmSortOrder);
            TestUtilsDMSortProperty.CreateUnsavedValidDMSortProperty(dmSortOrder);
            return dmSortOrder;
        }
    }
}